import request from "@/utils/request";
import { stringify } from "qs";
//获取列表分页
export async function getSuggestionPage(params) {
	return request(`/new-wms/purchasing/suggestion/page?${stringify(params)}`, {
		loading: true
	});
}
export async function getSuggestruleconfig(params) {
	return request(`/new-wms/suggestruleconfig/list?${stringify(params)}`, {
		loading: true
	});
}

export async function saveSuggestruleconfig(params) {
	return request(`/new-wms/suggestruleconfig/save`, {
		method: "POST",
		data: params,
		loading: true
	});
}
//区域编码模糊查询
export async function queryAreaCode(params) {
	return request(`/zjf-wms/storecodesort/selectListByName?${stringify(params)}`);
}
// 获取仓库;
export async function inventoryWarehouseList(params = {}) {
	return request(`/new-wms/inventory/warehouse-list`, {
		method: "POST",
		data: params,
		loading: true
	});
}
export async function totalInventoryList(params) {
	return request(`/new-wms/inventory/total-inventory-list?${stringify(params)}`, {
		loading: true
	});
}
// 获取门店（供应商）列表
export async function getZJFStorePage(params) {
	return request(`/blade-goods/zjfstore/list/fuzzyQueryPage?${stringify(params)}`, { method: "GET", loading: true });
}

// 创建采购单
export async function createPurchaseOrder(params = {}) {
	return request(`/new-wms/purchaseorder/create-purchase-order`, {
		method: "POST",
		data: params,
		loading: true
	});
}
// 获取区域编码信息
export async function getAreaInfo(params = {}) {
	return request(`/new-wms/purchasing/suggestion/get/area/info`, {
		method: "POST",
		data: params
		// loading: true
	});
}
